POV-Ray : Newsgroups : povray.programming : Improved intersection routine for CSG-Intersection objects : Re: [OT] Re: Improved intersection routine for CSG-Intersection objects Server Time
6 Oct 2024 15:17:57 EDT (-0400)
  Re: [OT] Re: Improved intersection routine for CSG-Intersection objects  
From: Nicolas Calimet
Date: 16 Dec 2003 19:04:51
Message: <3fdf9da3$1@news.povray.org>
>   I think you are confusing "string" and "stream" above. They are two
> quite different things... :)

	Yes, it was a mistake: writing "stream" for "string" (see my answer
to Thorsten that I posted 3 minutes before your message  :-p )

>   I was talking about std::string.
>   Almost *any* operation on a std::string is faster than an equivalent
> operation on a C string. The simplest example is getting the size
> of the string.
>   std::string::size() is a constant-time operation (it simply returns
> the value of a variable)

	This example is very trivial, and you can easily implement the same
in your own string library in C.  What I'd like to see is the performance of
creating a dynamical formatted string, similarly to vsprintf() -- but of course
without the static buffer passed as argument, which makes vsnprintf unecessary.

>   (If you do it wrong and you want to change it, you'll have to go
> through the millions of lines and change every place where it's
> used... Remember y2k?-) )

	'sed'  ;-)

	- NC


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.